% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/URL_FUNCTIONS_part1.R
\name{url_envirofacts_data}
\alias{url_envirofacts_data}
\title{Get URLs of EPA EnviroFacts API queries - DRAFT INCOMPLETE WORK IN PROGRESS}
\usage{
url_envirofacts_data(regid, as_html = FALSE, linktext)
}
\arguments{
\item{regid}{EPA-regulated facility registry identification (ID), vector}

\item{as_html}{Whether to return as just the urls or as html hyperlinks to use in a DT::datatable() for example}

\item{linktext}{used as text for hyperlinks, if supplied and as_html=TRUE}
}
\value{
URL(s)
}
\description{
Get URL(s) to query and get data on facilities from Envirofacts, in XML,JSON,CSV, or EXCEL format
}
\details{
see \url{https://www.epa.gov/enviro/web-services} and

\url{https://www.epa.gov/enviro/envirofacts-data-service-api}

(https://data.epa.gov/efservice/multisystem/minLatitude/35.465158/maxLatitude/52.912225/minLongitude/-104.387994/maxLongitude/-69.231744/count) ???

WORK IN PROGRESS .... need to look at the documentation more closely but what it returns is not what is expected for some attempts

WEBPAGE URL (returns a webpage)
e.g., \url{https://enviro.epa.gov/enviro/efsystemquery.multisystem?fac_search=primary_name&fac_value=&fac_search_type=Beginning+With&postal_code=&location_address=&add_search_type=Beginning+With&city_name=&county_name=&state_code=&TribalLand=0&TribeType=selectTribeALL&selectTribe=noselect&tribedistance1=onLand&sic_type=Equal+to&sic_code_to=&naics_type=Beginning+with&naics_to=326&chem_name=&chem_search=Beginning+With&cas_num=&page_no=1&output_sql_switch=FALSE&report=1&database_type=Multisystem}
https://enviro.epa.gov/enviro/efsystemquery.multisystem?state_code=DE&naics_type=Beginning+with&naics_to=326&database_type=Multisystem

API URL (returns data)
https://data.epa.gov/efservice/multisystem/minLatitude/35.465158/maxLatitude/52.912225/minLongitude/-104.387994/maxLongitude/-69.231744/naics_type/Beginning+with/naics_to/32611
https://data.epa.gov/efservice/multisystem/minLatitude/35.465158/maxLatitude/52.912225/minLongitude/-104.387994/maxLongitude/-69.231744/EXCEL
}
\seealso{
\code{\link[=url_ejscreen_report]{url_ejscreen_report()}}  \code{\link[=url_ejscreen_acs_report]{url_ejscreen_acs_report()}}   \code{\link[=url_ejscreenmap]{url_ejscreenmap()}}
\code{\link[=url_echo_facility_webpage]{url_echo_facility_webpage()}} \code{\link[=url_frs_report]{url_frs_report()}}  \code{\link[=url_enviromapper]{url_enviromapper()}}  \code{\link[=url_envirofacts_data]{url_envirofacts_data()}}
}
\keyword{internal}
